(Man-getpage-in-background): Use TERM=dumb to prevent
authorRichard M. Stallman <rms@gnu.org>
Sun, 13 Jun 1993 04:34:58 +0000 (04:34 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 13 Jun 1993 04:34:58 +0000 (04:34 +0000)
terminal control sequences in the output.

lisp/man.el

index 2b0f26e8bfe61f16dc88b1e52fc4fe231bc9fecd..48c61af24e9f9b9d967d77446030a2e09d405206 100644 (file)
@@ -445,9 +445,12 @@ Man-reuse-okay-p is non-nil."
        (Man-notify-when-ready buffer)
       (message "Invoking man %s in background..." man-args)
       (setq buffer (generate-new-buffer bufname))
-      (set-process-sentinel
-       (start-process "man" buffer "sh" "-c"
-                     (format (Man-build-man-command) man-args))
+      (let ((process-environment process-environment))
+       ;; Prevent any attempt to use display terminal fanciness.
+       (setenv "TERM" "dumb")
+       (set-process-sentinel
+        (start-process "man" buffer "sh" "-c"
+                       (format (Man-build-man-command) man-args)))
        'Man-bgproc-sentinel))
     ))